package br.ufes.cwtools.gw.android;

import br.ufes.cwtools.gw.android.connection_service.ConnectionService;
import br.ufes.cwtools.gw.android.location_service.LocationService;
import android.app.Application;
import android.content.Intent;

public class GWAndroidApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();
		//Inicializa os serviços
		startService(new Intent(this, ConnectionService.class));
		startService(new Intent(this, LocationService.class));
	}
	
	@Override
	public void onTerminate() {
		//Finaliza os serviços
		stopService(new Intent(this, ConnectionService.class));
		stopService(new Intent(this, LocationService.class));
		
		super.onTerminate();
	}
}